<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html>
    <head itemscope itemtype="http://schema.org/ItemPage">
        <link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
        <link rel="publisher" href="http://google.com/+RentpadPhi" />
        <c:if test="${model.leaseTermType == 1}"><link rel="canonical" href="${model.props.appPath}/for-rent/${fn:toLowerCase(model.listing.city)}/${model.listing.urlTitle}/${model.listing.id}"/></c:if>
        <c:if test="${model.leaseTermType == 2}"><link rel="canonical" href="${model.props.appPath}/for-rent/${fn:toLowerCase(model.listing.city)}/${model.listing.urlTitle}/${model.listing.id}"/></c:if>
                
        <c:if test="${model.listing.numBedrooms == 0}"><title>Studio ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}</title></c:if>
        <c:if test="${model.listing.numBedrooms > 0}"><title>${model.listing.numBedrooms} Bedroom ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}</title></c:if> 
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="${model.listing.displayShortDescription}" />        
        <meta name="keywords" content="${model.listing.structure} for rent, ${model.listing.structure} ${model.listing.city} for rent, ${model.listing.structure} ${model.propertyType.title} for rent, ${model.listing.propertyType.title} for rent in ${model.listing.city}, ${model.listing.city} ${model.listing.propertyType.title} for rent, ${model.listing.propertyType.title} for rent in ${model.listing.structure}, ${model.listing.structure} ${model.listing.propertyType.title} for rent"/>
        
        <meta property="og:type" content="website"  />      
        <meta property="og:site_name" content="Rentpad.com.ph"/>  
        <c:if test="${model.leaseTermType == 1}"><meta property="og:url" content="${model.props.appPath}/long-term-rentals/${fn:toLowerCase(model.listing.city)}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}"  /></c:if>
        <c:if test="${model.leaseTermType == 2}"><meta property="og:url" content="${model.props.appPath}/short-term-rentals/${fn:toLowerCase(model.listing.city)}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}"  /></c:if>        
        <c:if test="${model.listing.numBedrooms == 0}"><meta property="og:title" content="Studio ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}"  /></c:if>
        <c:if test="${model.listing.numBedrooms > 0}"><meta property="og:title" content="${model.listing.numBedrooms} Bedroom ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}"  /></c:if>            
        <meta property="og:description" content="${model.listing.displayShortDescription}" />
        <meta property="og:image" content="${model.props.rootPath}/uploads/img/002-${model.listing.primaryPhoto.filename}"  /> 
                        
        <meta name="twitter:card" content="summary"/>
        <meta name="twitter:site" value="@rentpadph"/>
        <meta name="twitter:url" content="http://rentpad.com.ph"/>
        <c:if test="${model.listing.numBedrooms == 0}"><meta name="twitter:title" content="Studio ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}"  /></c:if>
        <c:if test="${model.listing.numBedrooms > 0}"><meta name="twitter:title" content="${model.listing.numBedrooms} Bedroom ${model.listing.propertyType.title} For Rent in ${model.listing.city} at ${model.listing.structure}"  /></c:if>           
        <meta name="twitter:description" content="${model.listing.displayShortDescription}"/>
        <meta name="twitter:image" content="${model.props.appPath}/img/rentpad-logo-1.png"/>
        
        <meta itemprop="name" content="${model.listing.title}"/>
        <meta itemprop="description" content="${model.listing.displayShortDescription}"/>
        <meta itemprop="keywords" content="${model.listing.structure} for rent, ${model.listing.structure} ${model.listing.city} for rent, ${model.listing.structure} ${model.propertyType.title} for rent, ${model.listing.propertyType.title} for rent in ${model.listing.city}, ${model.listing.city} ${model.listing.propertyType.title} for rent, ${model.listing.propertyType.title} for rent in ${model.listing.structure}, ${model.listing.structure} ${model.listing.propertyType.title} for rent"/>
        <meta itemprop="image" content="${model.props.rootPath}/uploads/img/002-${model.listing.primaryPhoto.filename}"/>
        
        <link rel="stylesheet" href="${model.props.appPath}/css/jquery_mobile/jquery.mobile-1.2.1.min.css" type="text/css"/>
        <link href="${model.props.appPath}/css/photoswipe/photoswipe.css" type="text/css" rel="stylesheet" />
        <link href="${model.props.appPath}/css/photoswipe/jquery-mobile.css" type="text/css" rel="stylesheet" />
     
        <style>
            a {text-decoration:none;}      /* unvisited link */
            @font-face
            {
                font-family: avant;
                src: url('${model.props.appPath}/fonts/avangmi-webfont.ttf');
            }
            body  * {
                font-family: avant !important
            }
        </style>
        
        <script type="text/javascript" src="${model.props.appPath}/js/jquery_mobile/klass.min.js"></script>
        <script src="${model.props.appPath}/js/jquery/jquery-1.8.3.min.js"></script>
	<script src="${model.props.appPath}/js/jquery_mobile/jquery.mobile-1.2.1.min.js"></script>
        <script type="text/javascript" src="${model.props.appPath}/js/jquery_mobile/code.photoswipe.jquery-3.0.5.js"></script>
        
        <script type="text/javascript">
            var geocoder;
            var myLatlng;
            var map;
            var places, iw;
            var markers = [];
            var autocomplete;
            var listingMarkers = [];
            var currLatLng;
            var MY_MAPTYPE_ID = 'custom_style';
                        
            function showContactDetails() {                
                setTimeout(function(){      
                    var at = "${model.at}";   
                    var ownerID = "${model.ownerID}";
                    $.ajax({
                            type: 'POST',
                            url: "${model.props.appPath}/ws/inquiry.htm",
                            data: {
                                at: at,
                                ownerID: ownerID,       
                                a: 3000
                            },
                            timeout: 200000,
                            success: function(data) {
                                if (data.model.success) {
                                    var firstName = data.model.firstName;
                                    var lastName = data.model.lastName;
                                    var email = data.model.email;
                                    var mobile = data.model.mobile;
                                    var landline = data.model.landline;
                                    
                                    $("#contact-name").html(firstName + " " + lastName);
                                    $("#contact-email").html(email);
                                    $("#contact-mobile").html(mobile);
                                    $("#contact-landline").html(landline);                                    
                                }                                  
                            }
                        });         
                }
                ,2000);                
            }
            
            function submitTourForm() {
                var name = $("#text-tour-name").val();
                var email = $("#text-tour-email").val();
                var phone = $("#text-tour-phone").val();
                
                var nameUpperCase = name.toUpperCase();
                var emailUpperCase = email.toUpperCase();

                if (nameUpperCase == 'NAME') {
                    name = '';
                }
                if (emailUpperCase == 'EMAIL') {
                    email = '';
                }                
                
                try {
                    if (!name || !email) {
                        alert("Your name and email are required to proceed with your inquiry.");                        
                    } 
                    else {
                        $.ajax({
                            type: 'POST',
                            url: "${model.props.appPath}/ws/inquiry.htm",
                            data: {
                                name: name,
                                email: email,
                                phone: phone,
                                a: 2000
                            },
                            timeout: 200000,
                            success: function(data) {
                                alert("Success! Your inquiry has already been forwarded to the listing owner. Have a great day!");
                                $("#text-tour-name").val("");
                                $("#text-tour-email").val("");
                                $("#text-tour-phone").val("");
                                $("#text-tour-name").focusout();
                                $("#text-tour-email").focusout();
                                $("#text-tour-phone").focusout();
                            }
                        });                        
                    }
                }
                catch (e) {
                    alert(e);
                }
            }
            
            $('#basic_map').live("pageshow", function() {
                google.maps.event.trigger(map,'resize');
                map.setCenter(myLatlng);
            });

            $( document ).delegate("#basic_map", "pagebeforecreate", function() {           
                try {
                    var featureOpts = [ {
                            stylers: [{weight: 1}]
                        }, {
                            elementType: 'labels'
                        }, {
                            featureType: 'water'
                        }
                    ];

                    var lat = '<c:out value="${model.listing.lat}"/> ';
                    var lng = '<c:out value="${model.listing.lng}"/> '
                    
                    geocoder = new google.maps.Geocoder();
                    currLatLng = new google.maps.LatLng(lat, lng);
                    var myOptions = {
                        zoom: 14,
                        center: currLatLng,
                        scrollwheel: false,
                        navigationControl: false,
                        mapTypeControl: false,
                        scaleControl: false,
                        mapTypeId: MY_MAPTYPE_ID
                    };

                    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);            
                    var styledMapOptions = {
                        name: 'Custom Style'
                    };

                    var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions);
                    map.mapTypes.set(MY_MAPTYPE_ID, customMapType);

                    codeListings();  
                    places = new google.maps.places.PlacesService(map); 

                } 
                catch (e) { 
//                    alert(e); 
                }
            });
            
		(function(window, $, PhotoSwipe){

			$(document).ready(function(){
                            
                            showContactDetails();
                            
                            $("#submitBtn").click( function() {
                                submitTourForm();
                            });

                            $('div.gallery-page')
					.live('pageshow', function(e){
						
						var 
							currentPage = $(e.target),
							options = {},
							photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options,  currentPage.attr('id'));
							
						return true;
						
					})
					
					.live('pagehide', function(e){
						
						var 
							currentPage = $(e.target),
							photoSwipeInstance = PhotoSwipe.getInstance(currentPage.attr('id'));

						if (typeof photoSwipeInstance !== "undefined" && photoSwipeInstance !== null) {
							PhotoSwipe.detatch(photoSwipeInstance);
						}
						
						return true;
						
					});
				
			});

		}(window, window.jQuery, window.Code.PhotoSwipe));
        </script>
        
        <script>
            (function(i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function() {
                    (i[r].q = i[r].q || []).push(arguments)
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                        m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
            ga('create', 'UA-44197833-1', 'rentpad.com.ph');
            ga('send', 'pageview');
        </script>
        <script>
            function switchMenu() {
                if ($('#menu').is(':visible')) {                    
                    $("#menu").hide();
                } 
                else {
                    $("#menu").show();
                }
            }
        </script>
        
        <script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
        <script src="${model.props.appPath}/js/jquery_mobile/jquery.ui.map.full.min.js" type="text/javascript"></script>
        
        <%@ include file="include/listingsMaps_mobile.jsp" %>
        
    </head>
    
    <body itemprop="offers" itemscope itemtype="http://schema.org/Offer" >
        
        <div id="fb-root"></div>
        <script>
            (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
        </script>

        <div data-role="page" data-theme="c" id="searchPage">
            
            <%@include file="header_mobile.jsp" %>

            <c:if test="${model.owner}">
                <div data-role="navbar" style="width: 100%;" data-theme="a">
                    <ul>
                        <li><a href="#" data-theme="a" onclick="window.location='${model.props.appPath}/listing.htm?a=4&id=${model.listing.id}'">Edit Property </a></li>
                        <li><a href="#" data-theme="a" onclick="window.location='${model.props.appPath}/listing.htm?a=1003&id=${model.listing.id}'" >Edit Photos</a></li>
                    </ul>
                </div>
            </c:if>
            
            <div data-role="content" style="background-color: #F0F0F0;">

                <table border="0" style="width:100%; padding-bottom: 10px;">
                    <tr>
                        <td align="left" itemprop="itemOffered" itemscope itemtype="http://schema.org/Product"><b itemprop="name" style="font-family: avant;">${model.listing.displayTitle}</b></td>
                    </tr>
                    <tr>
                        <td align="left">
                            <div style="font-size: 14px; color: #666666; font-family: avant;">${model.listing.address}</div>
                        </td>
                    </tr>
                    <c:if test="${!model.listing.available}">
                    <tr>
                        <td>
                            <div style="font-size: 14px; color: tomato;">*Rented Out</div>     
                        </td>
                    </tr>
                    </c:if>
                    <tr>
                        <td align="left">
                            <br>
                            <img itemprop="image" src="${model.props.rootPath}/uploads/img/001-${model.listing.primaryPhoto.filename}" style="display: inline-block; height: 200px; width: 100%;"/>           
                        </td>
                    </tr>
                </table>
                        
                <fieldset class="ui-grid-a">
                    <div class="ui-block-a"><a href="#imgGallery"  data-role="button" data-mini="true">More Photos</a></div>
                    <div class="ui-block-b"><a href="#basic_map" data-rel="dialog" data-role="button" data-mini="true">Map</a></div>	   
                </fieldset>
                        
                <table border="0" style="padding-bottom: 5px; padding-top: 20px; width: 50%;">
                    <tr>
                        <td align="left">
                            <a href="mailto:?subject=Check out this ${model.listing.propertyType.title} for rent at ${model.listing.structure}&body=I think you might find this interesting: ${model.listing.title}. \n Here's the link: ${model.props.appPath}/long-term-rentals/${fn:toLowerCase(model.listing.city)}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}"><img src="${model.props.appPath}/img/email-32.png" alt="Email to a Friend" target="blank"/></a>
                        </td>
                        <td align="left">
                            <a href="#" 
                                onclick="
                                window.open(
                                'http://twitter.com/intent/tweet?text=${model.listing.title}%20-----%20&url=${model.props.appPath}/long-term-rentals/${fn:toLowerCase(fn:trim(model.listing.city))}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}'); 
                                return false;">
                                <img src="${model.props.appPath}/img/twitter-32.png" alt="Share on Twitter"/>
                            </a>  
                        </td>
                        <td align="left">
                            <a href="#" 
                                onclick="
                                window.open(
                                'https://plus.google.com/share?url=${model.props.appPath}/long-term-rentals/${fn:toLowerCase(fn:trim(model.listing.city))}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}'); 
                                return false;">
                                <img src="${model.props.appPath}/img/google+-32.png" alt="Share on Google Plus"/>
                            </a>
                        </td>
                        <td align="left">
                            <a href="#" 
                                onclick="
                                window.open(
                                'http://pinterest.com/pin/create/button/?url=${model.props.appPath}/long-term-rentals/${fn:toLowerCase(fn:trim(model.listing.city))}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}&media=${model.props.rootPath}/uploads/img/002-${model.listing.primaryPhoto.filename}&description=${model.listing.title}'); 
                                return false;">
                                <img src="${model.props.appPath}/img/pinterest-32.png" alt="Share on Pinterest"/>
                            </a>
                        </td>
                        <td align="right">
                            <div class="fb-send" data-href="${model.props.appPath}/long-term-rentals/${fn:toLowerCase(model.listing.city)}/${fn:replace(model.listing.title, ' ', '-')}/${model.listing.id}" data-colorscheme="light"></div>
                        </td>
                    </tr>
                </table>
                        
               <table style="padding-top: 20px;">
                    <tr>
                        <td align="left">
                            <p style="font-size: 14px; color: #666666; font-family: avant;">${model.listing.displayDescription}</p>
                        </td>
                    </tr>
                </table>
  
                       <ul data-role="listview" data-inset="true" data-theme="d">
                           <c:if test="${model.listing.shortDayRate != '0' && model.listing.shortDayRate != '0.0'}">
                                <li>Short Term Daily: <span style="font-weight: normal; padding-left: 5px;">&#8369; ${model.listing.shortDayRate}</span></li>
                           </c:if>
                           <c:if test="${model.listing.shortWeekRate != '0' && model.listing.shortWeekRate != '0.0'}">
                                <li>Short Term Weekly: <span style="font-weight: normal; padding-left: 5px;">&#8369; ${model.listing.shortWeekRate}</span></li>
                           </c:if>
                           <c:if test="${model.listing.shortMonthRate != '0' && model.listing.shortMonthRate != '0.0'}">
                                <li>Short Term Monthly: <span style="font-weight: normal; padding-left: 5px;">&#8369; ${model.listing.shortMonthRate}</span></li>
                           </c:if>
                           <c:if test="${model.listing.longMonthRate != '0' && model.listing.longMonthRate != '0.0'}">
                                <li>Long Term Monthly: <span style="font-weight: normal; padding-left: 5px;">&#8369; ${model.listing.longMonthRate}</span></li>
                           </c:if>
                           <c:if test="${not empty model.listing.city_place.title}">
                                <li>
                                    <span itemscope itemtype="http://schema.org/Place" itemprop="availableAtOrFrom">
                                        <a itemprop="name" href="${model.props.appPath}/places/${fn:replace(fn:toLowerCase(model.listing.city_place.title), ' ', '-')}/${model.listing.city_place.id}" style="color:#369;" data-ajax="false">Location: ${model.listing.city_place.title}</a>
                                        <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" style="position: relative; top:-8px; font-size: 12px;">
                                            <span>
                                                <c:if test="${not empty model.listing.city_place.street}"><meta itemprop="streetAddress" content="${model.listing.city_place.street}"></meta></c:if>
                                                <c:if test="${not empty model.listing.city_place.displayCity}"><meta itemprop="streetAddress" content="${model.listing.city_place.displayCity}"></meta></c:if>
                                                <c:if test="${not empty model.listing.city_place.region}"><meta itemprop="streetAddress" content="${model.listing.city_place.region}"></meta></c:if>
                                                <c:if test="${not empty model.listing.city_place.country}"><meta itemprop="streetAddress" content="${model.listing.city_place.country}"></meta></c:if>
                                            </span>                                                    
                                        </span>

                                        <span itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
                                            <meta itemprop="latitude" content="${model.listing.city_place.lat}" />
                                            <meta itemprop="longitude" content="${model.listing.city_place.lng}" />
                                        </span>

                                        <c:if test="${not empty model.listing.city_place.wikiURL}">
                                            <meta itemprop="sameAs" content="${model.listing.city_place.wikiURL}"/>  
                                        </c:if>

                                        <meta itemprop="url" content="${model.props.appPath}/places/${fn:replace(fn:toLowerCase(model.listing.city_place.title), ' ', '-')}/${model.listing.city_place.id}"/> 

                                    </span>
                                </li>   
                           </c:if>
                           <c:if test="${not empty model.listing.structure}">
                                <li> 
                                    <c:if test="${model.listing.community != null}">
                                        <a href="${model.props.appPath}/places/${fn:replace(fn:toLowerCase(model.listing.community.title), ' ', '-')}/${model.listing.community.id}" style="color:#369;" titile="${model.listing.community.title}" data-ajax="false">Community: ${model.listing.community.title}</a>
                                    </c:if>
                                    <c:if test="${model.listing.community == null}">
                                        Community:  <span style="font-weight: normal; padding-left: 5px;">${model.listing.structure}</span>
                                    </c:if>
                                </li>
                           </c:if>     
                           <c:if test="${not empty model.listing.floor}">
                                <li>Floor: <span style="font-weight: normal; padding-left: 5px;">${model.listing.floor}</span></li>
                           </c:if>
                           <c:if test="${model.listing.sqArea != '0.0'}">
                                <li>Square Area: <span style="font-weight: normal; padding-left: 5px;">${model.listing.sqArea} sqm.</span></li>
                           </c:if>
                                <li>Bedrooms: <span style="font-weight: normal; padding-left: 5px;">${model.listing.numBedrooms}</span></li>
                                <li>Bathrooms: <span style="font-weight: normal; padding-left: 5px;">${model.listing.numBathrooms}</span></li>
                           <c:if test="${not empty model.listing.furnishType.title}">
                                <li>Furnishing: <span style="font-weight: normal; padding-left: 5px;">${model.listing.furnishType.title}</span></li>
                           </c:if>  
                           <c:if test="${not empty model.listing.dateModified}">
                                <li>Last Updated: <span style="font-weight: normal; padding-left: 5px;"><fmt:formatDate value="${model.listing.dateModified}" pattern="MMMM dd, yyyy" /></span></li>
                           </c:if>
			</ul>
                        
                        <br>
                        
                        <c:if test="${fn:length(model.listing.amenities) > 0}">
                            <div style="padding-left: 2px;">
                                <b>Amenities:</b>
                            </div>

                            <table border="0" style="padding-top: 18px;" cellpadding="2" cellspacing="2">  
                                <c:forEach items="${model.listing.amenities}" var="amenity">
                                    <tr>
                                        <td><img src="${model.props.appPath}/img/check-green.jpg"</td>
                                        <td>${amenity.title}</td>
                                    </tr>
                                </c:forEach>  
                            </table>
                        </c:if>
                        
                        <br>
                        
                        <c:if test="${model.listing.roomoramaListing}">
                            <a href="https://www.roomorama.com/short-term-rentals/${model.listing.roomorama_id}?ref=chux18" data-role="button" style="background: firebrick; font-weight: normal; color: #fafafa;">Book Now via Roomorama</a>
                        </c:if>
                        
                        <c:if test="${!model.listing.roomoramaListing}">
<!--                            <a href="#dialogTour" data-rel="dialog" data-role="button" data-theme="e">Tour This Space</a>-->
                            <a href="#popupAgent" data-rel="popup" data-position-to="window" data-role="button" data-theme="b">Contact Details</a>
                        </c:if>
                        
                        <div data-role="popup" id="popupAgent" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
                            <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
                                
                            <div data-role="header" data-theme="a" class="ui-corner-top">
                                <h1>${model.listing.creator.lastName}</h1>
                            </div>
                            <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
                                <table>
                                    <tr>
                                        <td style="color: #666666;">Name:</td>
                                        <td><span id="contact-name">${model.listing.creator.firstName} ${model.listing.creator.lastName}</span></td>
                                    </tr>
                                    <tr>
                                        <td style="color: #666666;">Email:</td>
                                        <td><a id="contact-email" href="mailto:${model.listing.creator.emailPrimary}">${model.listing.creator.emailPrimary}</td>
                                    </tr>
                                    <tr>
                                         <td style="color: #666666;">Mobile:</td>
                                         <td><a id="contact-mobile" href="tel:${model.listing.creator.mobilePrimary}">${model.listing.creator.mobilePrimary}</a></td>
                                    </tr>
                                    <tr>
                                         <td style="color: #666666;">Phone:</td>
                                         <td><a id="contact-landline" href="tel:${model.listing.creator.landlinePrimary}">${model.listing.creator.landlinePrimary}</a></td>
                                    </tr>
                                </table>
                            </div>
                        </div>                                      
            </div>
        
            <div data-role="footer">
                <%@include file="footer_mobile.jsp" %>      
            </div>
        </div>
            
       <div data-role="page" data-add-back-btn="true" id="imgGallery" class="gallery-page" data-theme="c">

            <div data-role="header" >
                    <h1>Image Gallery</h1>
            </div>
           
           <p style="text-align: center">Click on an image to view<p>

           <div data-role="content" style="padding-top: 0px">	
                <ul class="gallery">
                    <c:forEach items="${model.listing.photos}" var="photo">
                        <li><a href="${model.props.rootPath}/uploads/img/001-${photo.filename}" rel="external"><img src="${model.props.rootPath}/uploads/img/001-${photo.filename}" alt="" /></a></li>                                                    
                    </c:forEach>
                 </ul>
            </div>
       </div>
                 
      <div data-role="page" id="dialogTour">

            <div data-role="header" data-theme="e">
		<h1>Tour Space</h1>
            </div>

            <div data-role="content" data-theme="d" style="text-align:center;">	
                
                <h3>Please Enter Your Details</h3>
                
                <form action="" data-ajax="false">
                    <div data-role="fieldcontain" style="border-bottom: 0px;">
                        <label for="text-tour-name">Name:</label>
                        <input type="text" name="text-tour-name" id="text-tour-name" value=""/>
                    </div>	     
                    <div data-role="fieldcontain" style="border-bottom: 0px;">
                        <label for="text-tour-email">Email:</label>
                        <input type="email" name="text-tour-email" id="text-tour-email" value=""/>
                    </div>      
                    <div data-role="fieldcontain" style="border-bottom: 0px;">
                        <label for="text-tour-phone">Phone:</label>
                        <input type="tel" name="text-tour-phone" id="text-tour-phone" value="" />
                    </div>
               </form> 
				
               <div style="text-align:center;">
                    <a id="submitBtn" data-role="button" data-theme="e">Submit</a>
               </div>
            </div>
        </div>
                 
        <div data-role="page" id="basic_map" style="text-align:center; width: 100%; height: 100%">

            <div data-role="header" data-theme="a">
		<h1>Map</h1>
            </div>

            <div data-role="content" data-theme="d" style="text-align:center;">	
                <div id="map_canvas" style="height:330px;"></div>
            </div>
        </div>
                
    </body>
</html>
